home *** CD-ROM | disk | FTP | other *** search
- Path: prairienet.org!sjmccaug
- From: sjmccaug@prairienet.org (Scott J. McCaughrin)
- Newsgroups: comp.lang.c++
- Subject: Re: Getting the Program Name
- Date: 23 Feb 1996 11:29:07 GMT
- Organization: University of Illinois at Urbana
- Message-ID: <4gk8e3$om8@vixen.cso.uiuc.edu>
- Reply-To: sjmccaug@prairienet.org (Scott J. McCaughrin)
- NNTP-Posting-Host: firefly.prairienet.org
-
-
- In a previous post was a query re: retrieving the program's name. Not sure
- if C++ does this, but in C, c0.asm does some initializing, then setargv.asm
- actually sets argv[0] to the program name. If you run 'debug' on any .COM
- and dump CS:002C, you will get the segment address of the environment. If
- you then dump that, with 0 offset: (env_seg:0000) and browse through the
- environment strings, you will eventually come upon the program name. This
- works for DOS 3+ according to the listing for setargv.asm.
-
- Wendy E. McCaughrin
-
-